home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 July / macformat-026.iso / mac / Shareware City / Developers / CDEF Template 1.0 / CDEF Template.h < prev   
Encoding:
Text File  |  1995-03-10  |  2.8 KB  |  57 lines  |  [TEXT/MPCC]

  1. /****************************************************************************************************
  2. *                                                                                                   *
  3. * CDEFTemplate.h -- Copyright Chris Larson (larson@cd.ucla.edu), 1994 - 1995 All Rights Reserved    *
  4. *                                                                                                   *
  5. * Header file for a CDEF shell.                                                                     *
  6. *                                                                                                   *
  7. * This source file and its compiled derivatives may be freely used within any freeware, shareware,  *
  8. * postcardware, beerware, etc. as long as you mention my name in your credits. Neither this source  *
  9. * nor its compiled derivatives are in the public domain and may not be use in any form in public    *
  10. * domain software. Neither this source nor its compiled derivatives may be used in any form in a    *
  11. * commercial product without the expressed, written consent of the author (me).                     *
  12. *                                                                                                   *
  13. * Version 1.0 -- March 10, 1995                                                                     *
  14. *                                                                                                   *
  15. ****************************************************************************************************/
  16.  
  17. // Include Files
  18.  
  19. #include <Controls.h>
  20. #include <Memory.h>
  21. #include <Types.h>
  22. #include <Windows.h>
  23.  
  24. // Constants
  25.  
  26. #define kColorPort    0xC000    // These bits are set in rowBytes if it’s a CGrafPort.
  27.  
  28. // Prototypes
  29.  
  30. pascal long main (short varCode, ControlHandle theControlHandle, short message, long param);
  31.  
  32. void BeginDraw(ControlHandle theControlHandle, short varCode, short partCode);
  33.  
  34. void DrawControl(ControlPtr theControl, short varCode, short partCode, CTabPtr windowColorTable,
  35.                  CTabPtr controlColorTable, Boolean inColor);
  36.  
  37. short FindControlPart(ControlPtr theControl, short varCode, Point hitPoint);
  38.  
  39. void CalculateControlRegion(ControlPtr theControl, short varCode, RgnHandle theRegion);
  40.  
  41. void CalculateIndicatorRegion(ControlPtr theControl, short varCode, RgnHandle theRegion);
  42.  
  43. void InitControl(ControlPtr theControl, short varCode);
  44.  
  45. void DispControl(ControlPtr theControl, short varCode);
  46.  
  47. void PositionIndicator(ControlPtr theControl, short varCode, short dv, short dh);
  48.  
  49. void CalcIndicatorValues(ControlPtr theControl, short varCode, Point hitPoint,
  50.                          IndicatorDragConstraintPtr info);
  51.  
  52. Boolean CustomDrag(ControlPtr theControl, short varCode, Boolean dragThumb);
  53.  
  54. void ActionProcedure(ControlPtr theControl, short varCode, short partCode);
  55.  
  56. RGBColor *FindColorInTable (CTabPtr colorTable, short id);
  57.